package routers

import (
	"xiegao/controllers"
	"xiegao/filters"

	"github.com/astaxie/beego"
)

func init() {
	np := beego.NewNamespace("/v1",
		beego.NSNamespace("/api",
			beego.NSBefore(filters.Cors),
			beego.NSInclude(
				&controllers.Login{},
				&controllers.AccessTokenController{},
				&controllers.TicketController{},
				&controllers.ProductController{},
				&controllers.ShopController{},
				&controllers.UploadController{},
				&controllers.HorseMan{},
				&controllers.Banner{},
			),
		),
	)
	beego.AddNamespace(np)
}
